<% include ./common/header.ejs %>
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-md-3 col-sm-3 col-xs-3 left_box">
                <div class="user_info">
                    <div><img src="/images/index/head.jpg" alt=""></div>
                    <p class="name">yuonly</p>
                    <p>5494785775@qq.com</p>
                </div>

                <ul class="category">
                
                    <li <%if(cid==0){ %> class="active" <%}%>>
                        <a href="/"><i class="icon-home"></i>首页</a>
                    </li>
                    <% for(var i=0;i<category.length;i++){ %>
                    <li <%if(cid==category[i].cid){%> class="active"  <%}%> >
                        <a href="/category?cid=<%=category[i].cid%>">
                            <i class="icon-reorder"></i><%=category[i].cname%>
                        </a>
                    </li>
                    <% } %>
                </ul>
            </div>
            <div class="col-md-9 col-sm-9 col-xs-9 right_box">
                <div class="header">
                    yu blog
                </div>
                <div class="content">
                    <ul>
                        <% for(let i=0;i<article.length;i++){ %>
                        <li class="article">
                            <div class="time"><%= moment(article[i].time).format('YYYY/MM/DD HH:mm:ss') %></div>
                            <div class="title"><%=article[i].title%></div>
                            <div class="content"><%=article[i].brife %></div>
                            <div class="footer">
                                <a href="/article?aid=<%=article[i].aid%>" class="btn btn-success btn-xs">阅读全文</a>
                            </div>
                        </li>
                        <% } %>
                        
                    </ul>
                </div>
            </div>
        </div>
    </div>

<% include ./common/footer.ejs %>